using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace NiftyDotNetDemo
{
    public partial class Example8 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                updateLayouts();
            }
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            updateLayouts();
        }

        private void updateLayouts()
        {
            string s = DropDownList1.SelectedValue;
            if (s.Equals("1"))
            {
                Nifty1.Visible = false;
                Nifty2.Visible = false;

            }
            if (s.Equals("2"))
            {
                Nifty1.Selectors = "ul#split h3";
                Nifty1.Corners.SetAll(false);
                Nifty1.MakeSameHeight = true;
                Nifty1.Visible = true;

                Nifty2.Selectors = "ul#split div";
                Nifty2.Corners.SetAll(false);
                Nifty2.MakeSameHeight = true;
                Nifty2.Visible = true;
            }

            if (s.Equals("3"))
            {
                Nifty1.Selectors = "ul#split h3";
                Nifty1.Corners.Set(true, true, false, false);
                Nifty1.CornerSize = NiftyDotNet.CornerSize.Big;
                Nifty1.MakeSameHeight = true;
                Nifty1.Visible = true;

                Nifty2.Selectors = "ul#split div";
                Nifty2.CornerSize = NiftyDotNet.CornerSize.Big;
                Nifty2.Corners.Set(false, false, true, true);
                Nifty2.MakeSameHeight = true;
                Nifty2.Visible = true;
            }
        }
    }
}
